using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace Acme.BookStore.Domain.Entities
{
    [Table("ShopTable")]
    public class Shop : Entity<string>
    {
        [Key]
        [Column("product_code")]
        public override string Id { get; protected set; }

        [Required]
        [Column("product_name")]
        [StringLength(100)]
        public string ProductName { get; set; }

        [Column("english_name")]
        [StringLength(100)]
        public string EnglishName { get; set; }

        [Column("japanese_name")]
        [StringLength(100)]
        public string JapaneseName { get; set; }

        [Column("specification")]
        public string Specification { get; set; }

        [Column("owner_code")]
        [StringLength(50)]
        public string OwnerCode { get; set; }

        [Column("customer_product_code")]
        [StringLength(50)]
        public string CustomerProductCode { get; set; }

        [Column("product_attribute")]
        [StringLength(50)]
        public string ProductAttribute { get; set; }

        [Column("category")]
        [StringLength(50)]
        public string Category { get; set; }

        [Column("product_type")]
        [StringLength(50)]
        public string ProductType { get; set; }

        [Column("split_control")]
        [StringLength(20)]
        public string SplitControl { get; set; }

        [Column("tray_layer_count")]
        public int? TrayLayerCount { get; set; }

        [Column("tray_height")]
        public int? TrayHeight { get; set; }

        [Column("billing_type")]
        [StringLength(50)]
        public string BillingType { get; set; }

        [Column("barcode")]
        [StringLength(50)]
        public string Barcode { get; set; }

        [Column("shelf_life_days_unit")]
        [StringLength(20)]
        public string ShelfLifeDaysUnit { get; set; }

        [Column("split_unit")]
        [StringLength(20)]
        public string SplitUnit { get; set; }

        [Column("volume")]
        public decimal? Volume { get; set; }

        [Column("weight")]
        public decimal? Weight { get; set; }

        [Column("split_quantity")]
        public int? SplitQuantity { get; set; }

        [Column("price")]
        public decimal? Price { get; set; }

        [Column("length")]
        public decimal? Length { get; set; }

        [Column("width")]
        public decimal? Width { get; set; }

        [Column("height")]
        public decimal? Height { get; set; }

        [Column("sku")]
        [StringLength(255)]
        public string Sku { get; set; }

        [Column("tingyong")]
        public int? Tingyong { get; set; }
        
        protected Shop()
        {
            // 给 ORM 用的空构造函数
        }
        
        public Shop(string id)
        {
            Id = id;
        }
    }
} 